package com.aabte.design.principle.liskowSubstitution.methodoutput;

import java.util.HashMap;

public class Child extends Base {

    /**
     * 子类重写或实现父类方法时，返回值必须比父类返回值类型相等或更严格
     */
    @Override
    public HashMap method() {
        HashMap hashMap = new HashMap();
        System.out.println("子类method被执行！");
        hashMap.put("msg", "子类method被执行");
        return hashMap;
    }
}
